<template>
    vue_default
    <img :src="b" alt="" style="height: 300px" />
    <button @click="handlePost">post</button>
</template>

<script setup lang="ts">
import axios from '@/utils/network/axios'
import { onMounted, ref } from 'vue'
const b = ref('')
function getImage() {
    axios.get('/hello', { responseType: 'blob' }).then((res) => {
        const url = URL.createObjectURL(res.data)
        b.value = url
    })
}
function handlePost() {
    axios.post('/hello', { name: '123' }).then((res) => {
        alert(res.data)
    })
}
onMounted(() => {
    getImage()
})
</script>

<style lang="scss"></style>
